<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // // m用于存放全部的数组
      // const m = []
      // const userInfo = {
      //   roles: [
      //     { name: '管理员', permission: ['a', 'b', 'c', 'd'] },
      //     { name: '审核员', permission: ['c', 'd'] },
      //   ],
      // }
      // // 先遍历出全部的数据
      // userInfo.roles.forEach((item) => {
      //   m.push(...item.permission)
      //   console.log(item)
      // })
      // // 进行去重操作
      // const A = m.filter((item, index) => {
      //   return m.indexOf(item) === index;
      // });
      // console.log(A);

      const knowleadges = [
        {
          name: '有理数',
          publish: '人教版',
          desc: '有理数的概念',
          excercies: [1, 2, 3, 4, 5],
        },
        {
          name: '有理数',
          publish: '苏教版',
          desc: '有理数的讲解',
          excercies: [1, 2, 3, 4],
        },
        {
          name: '有理数',
          publish: '泸教版',
          desc: '有理数的讲解',
          excercies: [1, 2, 3, 5],
        },
      ]
      // 1.遍历数据
      knowleadges.forEach((item) => {
        console.log(item);
      })


      
    </script>
  </body>
</html>
